package com.scuec.groupfive.Controller;

import com.scuec.groupfive.service.SubjectFinishedService;
import com.scuec.groupfive.vo.SubjectFinishedVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/api/subject-finished")
public class SubjectFinishedController {

    @Autowired
    private SubjectFinishedService subjectFinishedService;

    @GetMapping("/info")
    public List<SubjectFinishedVO> getSubjectFinishedInfo(@RequestParam Integer userId) {
        return subjectFinishedService.getSubjectFinishedInfo(userId);
    }
}